// import path from 'path';
const path = require('path')

module.exports = {
	title: '澳沙科技',
	description: '前端组件库文档',
	configureWebpack: {
		resolve: {
			alias: {
				'@styles': path.resolve(__dirname, './styles'),
				'@utils': path.resolve(__dirname, './components/utils'),
				'@img': path.resolve(__dirname, './components/img'),
				'@': path.resolve(__dirname, './components'),
				'@http': path.resolve(__dirname, './components/http')
			}
		},
	},
	scss: {
		additionalData: `
        @import "@styles/basic.scss";
        `
	},
	locales: {
		'/': {
			lang: 'zh-CN',
			title: '澳沙科技'
		}
	},
	plugins: {
		'demo-container': {
			locales: [
				{
					"lang": "zh-CN",
					"demo-block": {
						"hide-text": "隐藏代码",
						"show-text": "显示代码",
						"copy-text": "复制代码",
						"copy-success": "复制成功"
					}
				},
				// {
				//     "lang": "en-US",
				//     "demo-block": {
				//         "hide-text": "Hide",
				//         "show-text": "Expand",
				//         "copy-text": "Copy",
				//         "copy-success": "Successful"
				//     }
				// }
			]
		},
	},
	markdown: {
		lineNumbers: true, // 代码块显示行号
	},
	themeConfig: {
		locales: {
			'/': {
				// 多语言下拉菜单的标题
				selectText: '选择语言',
				// 该语言在下拉菜单中的标签
				label: '简体中文',
				// Service Worker 的配置
				serviceWorker: {
					updatePopup: {
						message: "发现新内容可用.",
						buttonText: "刷新"
					}
				},
				lastUpdated: '上次更新',
				// 当前 locale 的 algolia docsearch 选项
				algolia: {},
				nav: [
					{ text: '组件', link: '/home/search' },
				],
				sidebar: {
					'/home/': [
						['search', '搜索输入框'],
						['upload', '自动上传'],
						['tree', '树结构'],
						['transfer', '穿梭框'],
						['coverImage', '封面图']
					]
				}
			},
		},
	}
}